<?php

class openapi_api_params_v1_advance extends openapi_api_params_abstract implements openapi_api_params_interface{

    public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'getlogs'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'npage'=>array('required'=>'false','type'=>'number','name'=>'页码'),
                'pagesize'=>array('required'=>'false','type'=>'number','name'=>'页码大小'),
            ),
            'applycrash'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
            ),
            'withdraw'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'money'=>array('required'=>'true','type'=>'number','name'=>'提现金额'),
                'bank_name'=>array('required'=>'true','type'=>'string','name'=>'开户行'),
                'bank_cardname'=>array('required'=>'true','type'=>'string','name'=>'开户名'),
                'bank_cardid'=>array('required'=>'true','type'=>'string','name'=>'银行账号'),
                'memo'=>array('required'=>'false','type'=>'string','name'=>'备注'),
            ),
            'transfer'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
            ),
            'dotransfer'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'to_uname'=>array('required'=>'true','type'=>'string','name'=>'收款人用户名'),
                'money'=>array('required'=>'true','type'=>'number','name'=>'转账金额'),
                'message'=>array('required'=>'false','type'=>'string','name'=>'留言'),
            ),
            'transfer_pay'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'member_id'=>array('required'=>'true','type'=>'string','name'=>'用户id'),
                'to_uname'=>array('required'=>'true','type'=>'string','name'=>'收款人用户名'),
                'money'=>array('required'=>'true','type'=>'number','name'=>'转账金额'),
                'message'=>array('required'=>'false','type'=>'string','name'=>'留言'),
                'pay_password'=>array('required'=>'true','type'=>'string','name'=>'支付密码'),
            ),
            'total_advance'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
            ),
        );

        return $params[$method];
    }

    public function description($method){
        $description = array(
            'getlogs'=>array(
                'name'        =>'站内币流水记录',
                'description' =>'站内币流水记录',
            ),
            'applycrash'=>array(
                'name'        =>'申请提现',
                'description' =>'申请提现',
            ),
            'withdraw'=>array(
                'name'        =>'提交提现申请',
                'description' =>'提交提现申请',
            ),
            'transfer'=>array(
                'name'        =>'转账',
                'description' =>'转账',
            ),
            'dotransfer'=>array(
                'name'        =>'提交转账',
                'description' =>'提交转账',
            ),
            'transfer_pay'=>array(
                'name'        =>'确认转账',
                'description' =>'确认转账',
            ),
            'total_advance'=>array(
                'name'        =>'总支出提现状况',
                'description' =>'总支出提现状况',
            ),
        );
        return $description[$method];
    }

}